#include<stdio.h>
#include<math.h>
int main()
{
    int a,b,c,d;
    scanf("%d %d %d %d",&a,&b,&c,&d);
    double pi=3.1415926;
    double v,g;
    v=a*a*pi*b/4-pi*c*c*d/12;
    g=0.785*v;
    printf("%d %d",(int)v,(int)g);
    return 0;
}